/*
 * Selling Partner API for Listings Items
 *
 * The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you use to retrieve the information about Amazon product types needed to use the Listings Items API.  For more information, see the [Listings Items API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/listings-items-api-v2021-08-01-use-case-guide).
 *
 * The version of the OpenAPI document: 2021-08-01
 * Generated by: https://github.com/openapitools/openapi-generator.git
 */


using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System.ComponentModel.DataAnnotations;
using OpenAPIDateConverter = software.amzn.spapi.Client.OpenAPIDateConverter;

namespace software.amzn.spapi.Model.listings.items.v2021_08_01
{
    /// <summary>
    /// The request body schema for the &#x60;putListingsItem&#x60; operation.
    /// </summary>
    [DataContract(Name = "ListingsItemPutRequest")]
    public partial class ListingsItemPutRequest : IValidatableObject
    {
        /// <summary>
        /// The name of the requirements set for the provided data.
        /// </summary>
        /// <value>The name of the requirements set for the provided data.</value>
        [JsonConverter(typeof(StringEnumConverter))]
        public enum RequirementsEnum
        {
            /// <summary>
            /// Enum LISTING for value: LISTING
            /// </summary>
            [EnumMember(Value = "LISTING")]
            LISTING = 1,

            /// <summary>
            /// Enum LISTINGPRODUCTONLY for value: LISTING_PRODUCT_ONLY
            /// </summary>
            [EnumMember(Value = "LISTING_PRODUCT_ONLY")]
            LISTINGPRODUCTONLY = 2,

            /// <summary>
            /// Enum LISTINGOFFERONLY for value: LISTING_OFFER_ONLY
            /// </summary>
            [EnumMember(Value = "LISTING_OFFER_ONLY")]
            LISTINGOFFERONLY = 3
        }


        /// <summary>
        /// The name of the requirements set for the provided data.
        /// </summary>
        /// <value>The name of the requirements set for the provided data.</value>
        [DataMember(Name = "requirements", EmitDefaultValue = false)]
        public RequirementsEnum? Requirements { get; set; }
        /// <summary>
        /// Initializes a new instance of the <see cref="ListingsItemPutRequest" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected ListingsItemPutRequest() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="ListingsItemPutRequest" /> class.
        /// </summary>
        /// <param name="productType">The Amazon product type of the listings item. (required).</param>
        /// <param name="requirements">The name of the requirements set for the provided data..</param>
        /// <param name="attributes">A JSON object containing structured listings item attribute data keyed by attribute name. (required).</param>
        public ListingsItemPutRequest(string productType = default(string), RequirementsEnum? requirements = default(RequirementsEnum?), Dictionary<string, Object> attributes = default(Dictionary<string, Object>))
        {
            // to ensure "productType" is required (not null)
            if (productType == null)
            {
                throw new ArgumentNullException("productType is a required property for ListingsItemPutRequest and cannot be null");
            }
            this.ProductType = productType;
            // to ensure "attributes" is required (not null)
            if (attributes == null)
            {
                throw new ArgumentNullException("attributes is a required property for ListingsItemPutRequest and cannot be null");
            }
            this.Attributes = attributes;
            this.Requirements = requirements;
        }

        /// <summary>
        /// The Amazon product type of the listings item.
        /// </summary>
        /// <value>The Amazon product type of the listings item.</value>
        [DataMember(Name = "productType", IsRequired = true, EmitDefaultValue = true)]
        public string ProductType { get; set; }

        /// <summary>
        /// A JSON object containing structured listings item attribute data keyed by attribute name.
        /// </summary>
        /// <value>A JSON object containing structured listings item attribute data keyed by attribute name.</value>
        [DataMember(Name = "attributes", IsRequired = true, EmitDefaultValue = true)]
        public Dictionary<string, Object> Attributes { get; set; }

        /// <summary>
        /// Returns the string presentation of the object
        /// </summary>
        /// <returns>String presentation of the object</returns>
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("class ListingsItemPutRequest {\n");
            sb.Append("  ProductType: ").Append(ProductType).Append("\n");
            sb.Append("  Requirements: ").Append(Requirements).Append("\n");
            sb.Append("  Attributes: ").Append(Attributes).Append("\n");
            sb.Append("}\n");
            return sb.ToString();
        }

        /// <summary>
        /// Returns the JSON string presentation of the object
        /// </summary>
        /// <returns>JSON string presentation of the object</returns>
        public virtual string ToJson()
        {
            return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
        }

        /// <summary>
        /// To validate all properties of the instance
        /// </summary>
        /// <param name="validationContext">Validation context</param>
        /// <returns>Validation Result</returns>
        IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
        {
            yield break;
        }
    }

}
